Skip to content

chore: convert repository to Typescript #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 4, 2022
Merged

Conversation

ericapisani
Copy link
Contributor

@ericapisani ericapisani commented Mar 30, 2022

Addresses #106

Changes made

Used ts-migrate to perform the migration

This is a first pass migration where all the files were changed from using a .js extensionto using a .ts extension with the exception of index.js (which is a noop entry file).

I opted to use the reignore option in ts-migrate in order to have the project be in a compilable state so that we can add types in over time rather than needing to introduce them all within this pull request.

Introduced a tsconfig.json file in the root directory and in the __tests__ directory.

The one in the __tests__ directory extends from the one in the root directory, but is set to not emit JS files.

The configuration of the root directory tsconfig.json is the same one as that found in netlify-plugin-gatsby, but jest was added to the types property in order to ensure that the types associated with Jest are correctly picked up by the Typescript compiler.

Misc. changes

  • Small code tweaks in order to remove ts-expect-error statements that were added by ts-migrate
  • Updated commands to use the Typescript compiler in package.json

Testing plan

  • Existing tests pass
  • Linking these changes to netlify-plugin-gatsby and able to run demo Gatsby project in that project successfully

@ericapisani ericapisani requested a review from a team March 30, 2022 18:09
@ericapisani ericapisani added the type: chore work needed to keep the product and development running smoothly label Mar 30, 2022
@ascorbic ascorbic changed the title :chore - Convert repository to Typescript chore: convert repository to Typescript Mar 31, 2022
@ericapisani ericapisani self-assigned this Apr 4, 2022
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So happy that you've done this!

@kodiakhq kodiakhq bot merged commit 05494e7 into main Apr 4, 2022
@kodiakhq kodiakhq bot deleted the ep-convert-repo-to-ts branch April 4, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: chore work needed to keep the product and development running smoothly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants